package com.sxl.types;

import lombok.*;

import java.io.Serializable;

/**
 * @author : sxl
 * @date : 2024/8/15 9:59
 * @description: 响应结果
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Response<T> implements Serializable {
    private static final long serialVersionUID = -2474596551402989285L;

    private String code;
    private String info;
    private T data;


    @NoArgsConstructor
    @AllArgsConstructor
    @Getter
    public enum Code{
        SUCCESS("0000","调用成功"),
        UN_ERROR("0001","调用失败"),
        ILLEGAL_PARAMETER("0002", "非法参数"),
        ;
        private String code;
        private String info;
    }

}
